package Jun05ch22ex2;

import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;

public class MyBorderLayout {
	public static void main(String[] args) {
		JFrame jFrame = new JFrame();
		BorderLayout borderLayout = new BorderLayout();
		jFrame.setLayout(borderLayout);
		jFrame.add(new JButton("OK"), borderLayout.NORTH);
		jFrame.add(new JButton("Cancel"), borderLayout.SOUTH);
		jFrame.add(new JButton("East"), borderLayout.EAST);
		jFrame.add(new JButton("West"), borderLayout.WEST);
		jFrame.add(new JButton("Center"), borderLayout.CENTER);
		jFrame.setDefaultCloseOperation(jFrame.EXIT_ON_CLOSE);
		jFrame.setSize(400, 200);
		jFrame.setVisible(true);

	}
}
// grid layout + przyklad
// flout layout + przyklad